
<!DOCTYPE html>
<html>

<head>
   
    
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!--360浏览器优先以webkit内核解析-->


<title>日常费用报销申请</title>

<link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
<link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="__STATIC__/layout/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
<link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
<link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
<link href="__STATIC__/layout/css/channel.css?v=4.1.0" rel="stylesheet">
<!-- Sweet Alert -->
<link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <style>

    </style>

</head>

<body class="white-bg" style="padding: 3px;font-size: 12px">
    <div class="page-heade">
       <h2 class="title_color text-center">日常费用报销申请</h2>
    </div>
    <form action="" class="form-inline" id="form1">
        <table class="table table-bordered bud_hei text-center">
            <tr>
                <td colspan="4" class="text-left">
                    <p>温馨提示：请在发票粘贴联上注明此申请单编号： <a href="javascript:;">点击查看图例</a></p><br>
                    <p>并邮寄至： <span class="font-bold">广东省广州市番禺大道北383号6栋801 曾小姐收，020-85518159，赵六，13600000000签收。</span>(如邮寄地址未显示，请联系相关人员进行邮寄地址添加。)</p>
                </td>
            </tr>
            <tr>
                <td>代办人(申请人)：</td>
                <td class="text-left">蔡启豪</td>
                <td>报销单创建日期：</td>
                <td id="applytime" class="text-left"> </td>
            </tr>
            <tr>
                <td>费用计入部门 <span class="colorRed">*</span></td>
                <td class="text-left">
                       <div class="form-group">
                     <div class="input-group">
                            <input id="area_id" type="text" placeholder="请输入关键字或空格查询"
                                   class="form-control" value="" style="min-width: 300px;width: 300px">
                            <div class="input-group-btn">
                                <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                </ul>
                            </div>
                        </div>
                    </div>
                    <a href="javascript:;" id="select_area" class="btn btn-primary btn-sm">选择</a>
                </td>
                 <td>报销人 <span class="colorRed">*</span></td>
                <td class="text-left">
                       <div class="form-group">
                     <div class="input-group">
                            <input id="area_id" type="text" placeholder="请输入关键字或空格查询"
                                   class="form-control" value="" style="min-width: 300px;width: 300px">
                            <div class="input-group-btn">
                                <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                </ul>
                            </div>
                        </div>
                    </div>
                    <a href="javascript:;" id="select_area" class="btn btn-primary btn-sm">选择</a>
                </td>
            </tr>
            <tr>
                <td>报销单主题 <span class="colorRed">*</span></td>
                <td class="text-left">
                    <input type="text" name="" class="form-control">
                </td>
                <td>报销归入考核期 <span class="colorRed">*</span></td>
                <td>
                <select class="form-control select">
                  <option value="0">2017-11月</option>  
                  <option value="1">2017-09月</option>  
                  <option value="2">2017-08月</option>  
                </select>
                </td>
            </tr>
            <tr>
                <td>费用归属公司</td>
                <td class="text-left">
                  <select class="form-control select">
                      <option value="0">上海指掌天下软件有限公司</option>
                  </select>
                </td>
                <td>支付方式 <span class="colorRed">*</span></td>
                <td class="text-left">
                    <select class="form-control select" id="payWay">
                        <option value="0">请选择</option>
                        <option value="1">现金</option>
                        <option value="2">折扣</option>
                        <option value="3">转账</option>
                        <option value="4">货补</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>三级费用科目 <span class="colorRed">*</span></td>
                <td class="text-left" colspan="3">
                    <div class="form-group">
                     <div class="input-group">
                            <input id="area_id" type="text" placeholder="请输入关键字或空格查询"
                                   class="form-control" value="" style="min-width: 300px;width: 300px">
                            <div class="input-group-btn">
                                <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                </ul>
                            </div>
                        </div>
                    </div>
                    <a href="javascript:;" id="select_area" class="btn btn-primary btn-sm">选择</a>&nbsp;<a href="javascript:;" id="empty">清空</a>
                </td>
            </tr>
            <tr>
                <td>您选定的三级费用科目是</td>
                <td colspan="3" id="threeproject" class="text-left">12</td>
            </tr>
            <tr>
                <td>报销事由<span class="colorRed">*</span></td>
                <td colspan="3" class="text-left">
                    <textarea class="form-control" style="resize: none;width: 60%;height: 50px" id="bxcause"></textarea>
                </td>
            </tr>
            <tr class="text-left">
                <td rowspan="3" class="text-center">出差申请单号</td>
                <td>
                    <label class="checkbox-inline">
                        <input type="checkbox" name="" class="form-control"><a href="javascript:;">201711230002(11.19-11.20出差杭州。)</a>
                    </label>
                </td>
                 <td>
                    <label class="checkbox-inline">
                        <input type="checkbox" name="" class="form-control"><a href="javascript:;">201711230002(11.09出差韩后，)</a>
                    </label>
                </td>
                  <td>
                    <label class="checkbox-inline">
                        <input type="checkbox" name="" class="form-control"><a href="javascript:;">201711230002(10.24-26出差江门、中山)</a>
                    </label>
                </td>
            </tr>
            <tr class="text-left">
                <td>
                    <label class="checkbox-inline">
                        <input type="checkbox" name="" class="form-control"><a href="javascript:;">201711230002(11.19-11.20出差杭州。)</a>
                    </label>
                </td>
                 <td>
                    <label class="checkbox-inline">
                        <input type="checkbox" name="" class="form-control"><a href="javascript:;">201711230002(11.09出差韩后，)</a>
                    </label>
                </td>
                  <td>
                    <label class="checkbox-inline">
                        <input type="checkbox" name="" class="form-control"><a href="javascript:;">201711230002(10.24-26出差江门、中山)</a>
                    </label>
                </td> 
            </tr>
            <tr class="text-left">
                 <td>
                    <label class="checkbox-inline">
                        <input type="checkbox" name="" class="form-control"><a href="javascript:;">201711230002(11.19-11.20出差杭州。)</a>
                    </label>
                </td>
                 <td>
                    <label class="checkbox-inline">
                        <input type="checkbox" name="" class="form-control"><a href="javascript:;">201711230002(11.09出差韩后，)</a>
                    </label>
                </td>
                  <td>
                  
                </td>
            </tr>
            <tr>
              <td>万用申请单</td> 
              <td colspan="3" class="text-left font-bold"><span class="text-primary">近三个月无万用申请</span></td> 
            </tr>
        </table>
        <table class="table-bordered table bud_hei">
            <tr>
                <td colspan="8"><a href="javascript:;" class="btn-sm btn btn-success" id="addcostbx">添加费用报销明细</a><span class="lr_5"></span><span>(至少添加一条费用报销明细)</span></td>
            </tr>
            <tr class="info text-center">
                <td>操作</td>
                <td>序号</td>
                <td>使用人</td>
                <td>起止时间</td>
                <td>出发地点</td>
                <td>到达地点</td>
                <td>费用说明</td>
                <td>费用计入经销商</td>
            </tr>
        </table>
        <div class="form-group white-bg" style="margin:20px 10px 20px 20px;">
            <div id="uploader" class="wu-example">
                <!--用来存放文件信息-->
                <div id="thelist" class="uploader-list">
                                   </div>
                <div class="btns">
                    <div id="picker">选择文件</div>
                    <button id="ctlBtn" class="btn btn-default">开始上传</button>
                </div>
                <input type="hidden" name="attach" id="attach"  >
            </div>
            <span>注：最多上传15个文件，每个文件小于50M,支持格式：</span><br>jpg,bnp,gif,png,jpeg,tif,raw,doc,docx,xls,xlsx,ppt,pptx,txt,pdf,rar,zip,mp4,avi,rmvb,rm,mid,3gp,AVI,3GP,,mpg,mp3,wma,wav
        </div>

        <div class="padding-10 text-center"><button class="btn btn-primary" type="submit">保存为草稿</button><span class="lr_5"></span><button class="btn btn-success" type="button">保存并提交流程</button><span class="lr_5"></span><button class="btn btn-warning" type="button" onclick="back()">返回</button></div>
    </form>
  
    
<!-- 全局js -->
<script src="__STATIC__/layout/js/jquery.min.js"></script>
<script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
<!-- Sweet alert -->
<script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="__STATIC__/layout/js/plugins/suggest/bootstrap-suggest.min.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
<script>
    $(function () {
        $('body').on('click','input[type=text]',function () {
            this.select()
        })
    })
</script>

<script>
     getNowFormatDate();
    $("#applytime").html(getNowFormatDate())
   function getNowFormatDate() {
    var date = new Date();
    var seperator1 = "-";
    var seperator2 = ":";
    var month = date.getMonth() + 1;
    var strDate = date.getDate();
     var strHours= date.getHours();
    var strMinutes= date.getMinutes();
    var strSeconds= date.getSeconds();
    if (month >= 1 && month <= 9) {
        month = "0" + month;
    }
    if (strDate >= 0 && strDate <= 9) {
        strDate = "0" + strDate;
    }
   if (strHours >= 0 && strHours <= 9) {
        strHours = "0" + strHours;
    }
     if (strMinutes >= 0 && strMinutes <= 9) {
        strMinutes = "0" + strMinutes;
    }
      if (strSeconds >= 0 && strSeconds <= 9) {
        strSeconds = "0" + strSeconds;
    }
    var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
            + " " + strHours + seperator2 + strMinutes + seperator2 + strSeconds;
    return currentdate;
}
  
  var jieshou = $("#area_id");
 sousuo(jieshou);
       function sousuo(id){
            id.bsSuggest({
            allowNoKeyword: false, //是否允许无关键字时请求数据
            multiWord: true, //以分隔符号分割的多关键字支持
            separator: ",", //多关键字支持时的分隔符，默认为空格
            getDataMethod: "url", //获取数据的方式，总是从 URL 获取
            url: 'http://unionsug.baidu.com/su?p=3&t=' + (new Date()).getTime() + '&wd=',
            /*优先从url ajax 请求 json 帮助数据，注意最后一个参数为关键字请求参数*/
            jsonp: 'cb',
            /*如果从 url 获取数据，并且需要跨域，则该参数必须设置*/
            processData: function (json) { // url 获取数据时，对数据的处理，作为 getData 的回调函数
                var i, len, data = {
                    value: []
                };
                if (!json || !json.s || json.s.length === 0) {
                    return false;
                }

                // console.log(json);
                len = json.s.length;

                jsonStr = "{'value':[";
                for (i = 0; i < len; i++) {
                    data.value.push({
                        word: json.s[i]
                    });
                }
                data.defaults = 'baidu';

                //字符串转化为 js 对象
                return data;
            }
        });

          }
$("#addcostbx").click(function(){
    if($("#payWay").val()==0){
       swal("", "请选择支付方式！", "error")
    }else if($("#threeproject").text()==""){
        swal("", "三级费用科目不能为空！", "error")
    }else if($("#bxcause").val()==""){
        swal("", "报销事由不能为空！", "error")
    }else{
          layer.open({
                type: 2,
                title: '添加日常费用报销明细',
                 area: ['1200px', '600px'],
                fixed: false, //不固定
                maxmin: true,
                content: "{:url('Other/addcostbxDetail')}"
            });
            return false

    }
})
function back(){
    history.go(-1);
}
</script>
</body>

</html>